Skip to content

Conversation

hkBst
Copy link
Member

@hkBst hkBst commented Dec 21, 2024

I've removed the cryptic message about not being able to call &mut self methods while retaining a shared borrow of the iterator, such as as_slice produces. This is just normal borrowing rules and does not seem especially relevant here. I can whip up a replacement if someone thinks it has value.

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2024

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Dec 21, 2024
@hkBst
Copy link
Member Author

hkBst commented Dec 21, 2024

@jhpratt want to take this one too? Thanks for reviewing my recent similar changes!

@rust-log-analyzer

This comment has been minimized.

/// // First, we need a slice to call the `iter` method on:
/// let slice = &[1, 2, 3];
///
/// // Then we call `iter` on the slice to get the `Iter` struct,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually correct as-is. Given that it's documentation on the Iter type itself, there shouldn't be any confusion here. Likewise throughout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is certainly correct, but later prose talks about calling the X method "of the iterator", without an iterator having been mentioned before. If you think it is less clear without struct, perhaps we can use something like "the Iter struct (which is an iterator)" or "the Iter struct (which implements the Iterator trait)"? What do you think?


/// Views the underlying data as a subslice of the original data.
///
/// This has the same lifetime as the original slice, and so the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT this is just normal borrowing rules and does not seem especially relevant here.

@jhpratt
Copy link
Member

jhpratt commented Dec 22, 2024

@rustbot claim
@rustbot author

@rustbot rustbot assigned jhpratt and unassigned Amanieu Dec 22, 2024
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. has-merge-commits PR has merge commits, merge with caution. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 22, 2024
@rustbot

This comment has been minimized.

@rustbot rustbot removed the has-merge-commits PR has merge commits, merge with caution. label Dec 22, 2024
@rust-log-analyzer

This comment has been minimized.

I've removed the cryptic message about not being able to call `&mut self` methods while retaining a shared borrow of the iterator, such as `as_slice` produces. This is just normal borrowing rules and does not seem especially relevant here. I can whip up a replacement if someone thinks it has value.
@hkBst
Copy link
Member Author

hkBst commented Dec 24, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 24, 2024
@hkBst
Copy link
Member Author

hkBst commented Jan 9, 2025

@jhpratt friendly ping

@jhpratt
Copy link
Member

jhpratt commented Jan 10, 2025

I must've dismissed the notification; apologies 🙂

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 10, 2025

📌 Commit 5065a91 has been approved by jhpratt

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jan 10, 2025

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2025
@bors bors merged commit 3806127 into rust-lang:master Jan 10, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 10, 2025
@hkBst hkBst deleted the patch-7 branch February 2, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants